<template>
  <div class="wrap">
    <div class="block">
      <div
        class="line"
        v-for="(item, index) in infoData"
        :key="index"
        @click="rowHandle(item)"
      >
        <div class="title">
          <p class="description" style="margin-bottom: 4px;">故障单位:</p><p>{{ item.customer }}</p>
        </div>
        <div class="description">
          <p style="margin-bottom: 4px;">故障信息:</p><p>{{ item.description }}</p>
        </div>
      </div>
    </div>
    <!-- <div class="more" @click="moreHandle">
      <span>查看更多</span>
    </div> -->
  </div>
</template>

<script>
export default {
  name: "InfoList",
  props: {
    span: Number,
    infoData: Array
  },
  data() {
    return {};
  },

  methods: {
    rowHandle(item) {
      item.suit = false;
      if (item.afterSaleNumber !== "") {
        window.open(
          `/#/saleDetail?orderNumber=${item.repairOrderNumber}&saleNumber=${item.afterSaleNumber}&suit=${item.suit}`
        );
      } else {
        window.open(`/#/clientDetail?orderNumber=${item.repairOrderNumber}`);
      }
    },
    moreHandle() {
      this.$router.push({
        path: "/mendList"
      });
    }
  },
  created() {},
  mounted() {},
  destroyed() {}
};
</script>

<style scoped="scoped">
.wrap {
  position: absolute;
  top: 76px;
  left: 28px;
  z-index: 1;
}
.block {
  width: 520px;
  height: 226px;
  background: #ffffff;
  border: 1px solid #e5e5e5;

  overflow: auto;
}

.block .line {
  padding: 8px 16px;
  border-bottom: 1px solid #e5e5e5;
  cursor: pointer;
}

.line .title {
  font-size: 16px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: #000000;
  margin-bottom: 8px;
}

.line .description {
  font-size: 14px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: #818181;
}

.more {
  font-size: 12px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  font-style: italic;
  text-decoration: underline;
  color: #1890ff;
  line-height: 30px;
  cursor: pointer;
}
</style>
